﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZX
{
    /// <summary>
    /// 项目信息变更接口
    /// </summary>
    internal interface IProjInfoChanger
    {
        /// <summary>
        /// 获取项目信息变更列表
        /// </summary>
        /// <returns>项目信息变更列表</returns>
        IEnumerable<ProjChangeInfo> GetProjChangedInfoList();

        /// <summary>
        /// 项目信息变更后处理
        /// </summary>
        /// <param name="changedResultList">待处理列表</param>
        void OnChanged(IEnumerable<ProjInfoChangeResultItem> changedResultList);
    }

    /// <summary>
    /// 项目信息变更处理结果类
    /// </summary>
    public class ProjInfoChangeResult
    {
        public string Code { get; set; }

        public string Msg { get; set; }

        /// <summary>
        /// 项目变更处理列表
        /// </summary>
        public IEnumerable<ProjInfoChangeResultItem> ChangeResultList { get; set; }
    }

    /// <summary>
    /// 项目信息变更处理结果项类（当前到项目级，可能考虑到更细层级）
    /// </summary>
    public class ProjInfoChangeResultItem
    {
        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNo { get; set; }

        /// <summary>
        /// 项目编码
        /// </summary>
        public string ProjCode { get; set; }

        /// <summary>
        /// 结果编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 结果消息
        /// </summary>
        public string Message { get; set; }
    }

    /// <summary>
    /// 项目信息变更内容
    /// </summary>
    public class ProjChangeInfo
    {
        /// <summary>
        /// 项目编码
        /// </summary>
        public string ProjCode { get; set; }

        /// <summary>
        /// 项目信息变更内容列表
        /// </summary>
        public IEnumerable<KeyValuePair<string, object>> ChangeInfos { get; set; }
    }
}
